const express=require("express")
const router=express.Router()
const findArticleDetails=require("../service/classifyArticleList")
router.get("/classifyArticleList/:classify",(req,res)=>{
    let classify=req.params.classify
    findArticleDetails(classify).then(data=>{
        if(data==404){
            res.json({
                status:data,
                msg:"文章详情空"
            })
            res.end()
        }else{
            res.json({
                status:200,
                msg:data
            })
            res.end()
        }
    })
})
module.exports=router